export default class test_prefab extends Laya.Script {
    /** @prop {name:test, tips:"test预制体", type:Prefab}*/
    public test: Laya.Prefab
    
    private test_pre:Laya.Sprite
    
    constructor() { super(); }
    
    onEnable(): void 
    {
        

        //通过对象池创建相应预制体
        this.test_pre = Laya.Pool.getItemByCreateFun(
            "test_pre",
            this.test.create,
            this.test
        )
        //将创建出来的预制体添加到舞台
        this.owner.addChild(this.test_pre)
        this.test_pre.pos(100,100)
    }


    onKeyDown()
    {
        
    }

    onDisable(): void {
    }
}